
include irvine32.inc

.data
CaseTable byte 'A'
		  dword Process_A
EntrySize = ($ - CaseTable)
		  byte 'B'
		  dword Process_B
		  byte 'C'
		  dword Process_C
		   byte 'D'
		  dword Process_D
NumberOfEntries = ($ - CaseTable) / EntrySize
prompt byte "Press capital A, B, C or D: ", 0
msgA byte "Process_A", 0
msgB byte "Process_B", 0
msgC byte "Process_C", 0
msgD byte "Process_D", 0
.code
main proc
	mov edx, offset prompt
	call WriteString
	call ReadChar
	mov ebx, offset CaseTable
	mov ecx, NumberOfEntries
	L1:
		cmp al, [ebx]
		jne L2
		call near ptr [ebx + 1]
		call WriteString
		call Crlf
		jmp L3
	L2:
		add ebx, EntrySize
		loop L1
	L3:
		exit
main endp

Process_A proc
	mov edx, offset msgA
	ret
Process_A endp

Process_B proc
	mov edx, offset msgB
	ret
Process_B endp

Process_C proc
	mov edx, offset msgC
	ret
Process_C endp

Process_D proc
	mov edx, offset msgD
	ret
Process_D endp
end main